package libraries;

import java.io.File;

import java.sql.Connection;
import java.sql.PreparedStatement;

import javax.swing.ImageIcon;
import javax.swing.JFrame;

import GUI.BDPacienteSave;
import GUI.InterPacienteSave;


public class MultimediaLibrary {
    public static final int ICON_LOGOUPNA = 1;
    public static final int ICON_LOGOGN = 2;
    public static final int ICON_LOGOV = 3;
    public static final int ICON_LOGOA = 4;
    public static final int ICON_LOGOR = 5;
    public static final int ICON_ERROR = 6;
    public static final int ICON_ERROR2 = 7;
    public static final int ICON_TICK = 8;
    
        
    private static MultimediaLibrary instance = new MultimediaLibrary();
    
    /*1*/ private ImageIcon logoUPNA; 
    /*2*/ private ImageIcon logoGN;        
    /*3*/ private ImageIcon logoV; 
    /*4*/ private ImageIcon logoA; 
    /*5*/ private ImageIcon logoR;        
    /*6*/ private ImageIcon error;
    /*7*/ private ImageIcon error2;
    /*8*/ private ImageIcon tick;
          
        
    private MultimediaLibrary() {
  
        // DEFINICIÓN DE LOS IMAGEICON
        /*1*/  logoUPNA = new ImageIcon(this.getClass().getResource("/Software Images/Logos/No-image.png"));
        /*2*/  logoGN = new ImageIcon(this.getClass().getResource("/Software Images/Logos/No-image.png"));        
        /*3*/  logoV = new ImageIcon(this.getClass().getResource("/Software Images/IconoDicomizadorV.gif"));
        /*4*/  logoA = new ImageIcon(this.getClass().getResource("/Software Images/IconoDicomizadorA.gif"));
        /*5*/  logoR = new ImageIcon(this.getClass().getResource("/Software Images/IconoDicomizadorR.gif"));        
        /*6*/  error = new ImageIcon(this.getClass().getResource("/Software Images/error.gif"));
        /*7*/  error2 = new ImageIcon(this.getClass().getResource("/Software Images/error2.gif"));
        /*8*/  tick = new ImageIcon(this.getClass().getResource("/Software Images/tick.gif"));
    }
    
    public static MultimediaLibrary getInstance() {
        return instance;
    }
           
    /*public String pathRaiz(){
        File raiz;
        raiz = new File("");
        path = raiz.getAbsolutePath();
        //System.out.println("PATH: "+path);
        path = path.concat("//");
        return path;
    }*/
    
    public ImageIcon getImageIcon(int input){
    /*
     *  FUNCI�N DE CARGA DE IM�GENES: IMAGE-ICON
     *  SE GENERAN LOS IMAGEICON A PARTIR DE LOS PATH DE IM�GENES. 
     *    
     */    
        // DEFINICI�N DE LA VARIABLE DE SALIDA
        ImageIcon output = null;
        
        // SELECTOR DE IMAGEICON A ENTREGAR               
        switch(input){
                    case(1): output = logoUPNA;  
                                break;
                    case(2): output = logoGN;
                               break;
                    case(3): output = logoV;
                               break;
                    case(4): output = logoA;
                               break;
                    case(5): output = logoR;
                               break;
                    case(6): output = error;
                               break;
                    case(7): output = error2;
                               break;
                    case(8): output = tick;
                               break;
                                                   
                }
    
        return output;
    }
}

    
